]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
calendar: Allow translators to change non-work days
authorLavi .A <laviams@gmail.com>
Wed, 23 Nov 2011 16:48:00 +0000 (16:48 +0000)
committerBastien Nocera <hadess@hadess.net>
Fri, 7 Nov 2014 17:21:10 +0000 (18:21 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=664645

js/ui/calendar.js

index e639ef739c1ce278196e2fab52a23a6f54e3525e..127eb2d2d66161310d306c10d90ec4227449dd3d 100644 (file)
@@ -34,12 +34,10 @@ function _sameDay(dateA, dateB) {
     return _sameMonth(dateA, dateB) && (dateA.getDate() == dateB.getDate());
 }
 
-/* TODO: maybe needs config - right now we assume that Saturday and
- * Sunday are non-work days (not true in e.g. Israel, it's Sunday and
- * Monday there)
- */
 function _isWorkDay(date) {
-    return date.getDay() != 0 && date.getDay() != 6;
+    /* Translators: Enter 0-6 (Sunday-Saturday) for non-work days. Examples: "0" (Sunday) "6" (Saturday) "06" (Sunday and Saturday). */
+    let days = C_('calendar-no-work', "06");
+    return days.indexOf(date.getDay().toString()) == -1;
 }
 
 function _getBeginningOfDay(date) {